
*********************************************************
*                                                       *
*                  PSRM Results Replication             *  
*                                                       *
*********************************************************
set more off
cd "~/PSRM Replication"
capture log close
log using "CarreriPayson_replication.log", replace



******** Figure 1 - Example of Survey Question, Scoring Grid, and Anonymized Answers
** Note: this figure shows raw text from our survey transcripts and is not generated via code




******** Figure 2 - Distribution of the Managerial Score
set more off
graph set window fontface "Times New Roman"
use "CarreriPayson_replication_main.dta", clear
duplicates drop city state, force
su mgmt_re
hist mgmt_re, ///
 xtitle("Managerial Score", size(medium)) xlabel(1(1)5, labsize(medsmall)) ///
 ytitle("Density", size(medium)) ylabel(0(.2)1, labsize(medsmall) angle(0) nogrid ) ///
 legend(off) color(gray) lcolor(white) ///
 graphregion(color(white)) plotregion(color(white)) ///
 addplot(pci 0  3.67  .8  3.67, lcolor(blue) lwidth(thick))
graph save "Figure2", replace
graph export "Figure2.pdf", as(pdf) replace
erase "Figure2.gph"



******** Table 1 - Individual Correlates of the Managerial Score
set more off
use "CarreriPayson_replication_main.dta", clear
duplicates drop city state, force
cap erase "Table1.txt"
cap erase "Table1.tex"
* column 1
reg mgmt_re age_inoffice
outreg2 using "Table1.tex", bdec(3) label ///
 keep(age_inoffice) ///
 addtext(State FE, N, Population Quintile FE, N)
* column 2
reg mgmt_re age_inoffice q0g_female minority
outreg2 using "Table1.tex", bdec(3) label ///
 keep(age_inoffice q0g_female minority q18_college q18_more_college ///
	  q15b_govtexperience) ///
 addtext(State FE, N, Population Quintile FE, N)
* column 3
reg mgmt_re age_inoffice q0g_female minority q18_college q18_more_college
outreg2 using "Table1.tex", bdec(3) label ///
 keep(age_inoffice q0g_female minority q18_college q18_more_college ///
	  q15b_govtexperience) ///
 addtext(State FE, N, Population Quintile FE, N)
* column 4
reg mgmt_re age_inoffice q0g_female minority  q18_college q18_more_college ///
			q15b_govtexperience q20_occupation_business
outreg2 using "Table1.tex", bdec(3) label ///
 keep(age_inoffice q0g_female minority q18_college q18_more_college ///
	  q15b_govtexperience q20_occupation_business) ///
 addtext(State FE, N, Population Quintile FE, N)
* column 5
reg mgmt_re age_inoffice q0g_female minority  q18_college q18_more_college ///
			q15b_govtexperience q20_occupation_business ///
		    q14_center q14_right
outreg2 using "Table1.tex", bdec(3) label ///
 keep(age_inoffice q0g_female minority q18_college q18_more_college ///
	  q15b_govtexperience q20_occupation_business ///
	  q14_center q14_right) ///
 addtext(State FE, N, Population Quintile FE, N)
* column 6
reg mgmt_re age_inoffice q0g_female minority  q18_college q18_more_college ///
			q15b_govtexperience q20_occupation_business ///
		    q14_center q14_right i.state_id 
outreg2 using "Table1.tex", bdec(3) label ///
 keep(age_inoffice q0g_female minority q18_college q18_more_college  ///
	  q15b_govtexperience q20_occupation_business ///
	  q14_center q14_right) ///
 addtext(State FE, Y, Population Quintile FE, N)
* column 7
reg mgmt_re age_inoffice q0g_female minority  q18_college q18_more_college ///
			q15b_govtexperience q20_occupation_business ///
		    q14_center q14_right i.state_id  i.state_id i.pop_quint
outreg2 using "Table1.tex", bdec(3) label ///
 keep(age_inoffice q0g_female minority q18_college q18_more_college ///
	  q15b_govtexperience q20_occupation_business ///
	  q14_center q14_right) ///
 addtext(State FE, Y, Population Quintile FE, Y)
 erase "Table1.txt"

 
 
 ******** Table 2 - Managerial Score and Growth
 ** Note: generates each panel of Table 2 as a separate table named by dependent variable
set more off
use "CarreriPayson_replication_main.dta", clear
foreach x in pop_acs medhome c_rev_property {
cap erase "Table2_`x'.txt"
cap erase "Table2_`x'.tex"
* Baseline 
reghdfe ln`x' post_mgmt_re, ///
	absorb(city_id year_calendar year_normalized i.interviewer_id#i.post manager#i.post i.pop_quint#i.post) ///
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "Table2_`x'.tex", keep(post_mgmt_re) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, N, City Controls, N) bdec(3) nocon label	
* With Mayor Control
reghdfe ln`x' post_mgmt_re , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "Table2_`x'.tex", keep(post_mgmt_re) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, Y, City Controls, N) bdec(3) nocon label	
* With Mayor & City Control
reghdfe ln`x' post_mgmt_re , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "Table2_`x'.tex", keep(post_mgmt_re) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, Y, City Controls, Y) bdec(3) nocon label	
erase "Table2_`x'.txt"
}




***** Figure 3 - Timing of Changes in Growth Indicators
** Panel A. Population
set more off
use "CarreriPayson_replication_main.dta", clear
gen period_1 = (year_normalized==-4)
gen period_2 = (year_normalized==-3)
gen period_3 = (year_normalized==-2)
gen period_4 = (year_normalized==-1)
gen period_5 = (year_normalized==0)
gen period_6 = (year_normalized==1)
gen period_7 = (year_normalized==2)
gen period_8 = (year_normalized==3)
gen period_9 = (year_normalized==4)
forvalues i=1(1)9 {
 gen d`i'=mgmt_re*period_`i'
 }
reghdfe lnpop_acs d1-d4 d6-d9  , ///
  absorb(city_id year_calendar year_normalized  manager#i.post) ///
	vce(cluster city_id)  keepsingletons 
	su mgmt if e(sample)
	local mgmt_sd = r(sd)
    * save coefficients
    foreach i in 1 2 3 4 6 7 8 9 {
        local b`i' = _b[d`i']*`mgmt_sd'
        local se`i' = _se[d`i']
        local ub_b`i' = _b[d`i']*`mgmt_sd' + 1.96*_se[d`i']*`mgmt_sd'
        local lb_b`i' = _b[d`i']*`mgmt_sd' - 1.96*_se[d`i']*`mgmt_sd'
         }
  clear
  set obs 9
  egen t = seq()
  gen b = 0
  gen se = 0
  gen ub_b = 0
  gen lb_b = 0
  label var b "Population"
    foreach i in 1 2 3 4 6 7 8 9 {
       replace b = `b`i'' in `i'
       replace se = `se`i'' in `i'
       replace ub_b = `ub_b`i'' in `i'
       replace lb_b = `lb_b`i'' in `i'
       }
	replace t=t-5
 twoway (connected b t, mcolor(black) lcolor(black) lpattern(solid)  msymbol(D) lwidth(medthick)) ///
		(connected lb_b t, lcolor(black) msymbol(none) lpattern(dot) lwidth(medthick)) ///
		(connected ub_b t, lcolor(black) msymbol(none) lpattern(dot) lwidth(medthick)) , ///
         xtitle("Years since election/appointment", size(large)) xlabel(-4(1)4, labsize(medlarge)) ///
		 ytitle("δ estimate x standard deviation", size(large)) ylabel(-.05(0.025).05, nogrid angle(0) glcolor(gs16) labsize(medlarge)) ///
         graphregion(color(white)) plotregion(color(white)) ///
		 legend(off) yline(0, lcolor(red) lw(medium))  ///
		 xline(0, lpattern(dot) lcolor(red) lwidth(medthick)) aspectratio(.5)
 graph save "Figure3_a", replace
 graph export "Figure3_a.pdf" , as(pdf) replace
 
** Panel B. Median Home Values 
set more off
use "CarreriPayson_replication_main.dta", clear
gen period_1 = (year_normalized==-4)
gen period_2 = (year_normalized==-3)
gen period_3 = (year_normalized==-2)
gen period_4 = (year_normalized==-1)
gen period_5 = (year_normalized==0)
gen period_6 = (year_normalized==1)
gen period_7 = (year_normalized==2)
gen period_8 = (year_normalized==3)
gen period_9 = (year_normalized==4)
forvalues i=1(1)9 {
 gen d`i'=mgmt_re*period_`i'
 }
* With Controls - log
reghdfe lnmedhome d1-d4 d6-d9  , ///
  absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ) ///
	vce(cluster city_id)  keepsingletons 
	su mgmt if e(sample)
	local mgmt_sd = r(sd)
    * save coefficients
    foreach i in 1 2 3 4 6 7 8 9 {
        local b`i' = _b[d`i']*`mgmt_sd'
        local se`i' = _se[d`i']
        local ub_b`i' = _b[d`i']*`mgmt_sd' + 1.96*_se[d`i']*`mgmt_sd'
        local lb_b`i' = _b[d`i']*`mgmt_sd' - 1.96*_se[d`i']*`mgmt_sd'
         }
  clear
  set obs 9
  egen t = seq()
  gen b = 0
  gen se = 0
  gen ub_b = 0
  gen lb_b = 0
  label var b "Median Home Values"
    foreach i in 1 2 3 4 6 7 8 9 {
       replace b = `b`i'' in `i'
       replace se = `se`i'' in `i'
       replace ub_b = `ub_b`i'' in `i'
       replace lb_b = `lb_b`i'' in `i'
       }
	replace t=t-5
 twoway (connected b t, mcolor(black) lcolor(black) lpattern(solid)  msymbol(D) lwidth(medthick)) ///
		(connected lb_b t, lcolor(black) msymbol(none) lpattern(dot) lwidth(medthick)) ///
		(connected ub_b t, lcolor(black) msymbol(none) lpattern(dot) lwidth(medthick)), ///
         xtitle("Years since election/appointment", size(large)) xlabel(-4(1)4, labsize(medlarge)) ///
		 ytitle("δ estimate x standard deviation", size(large)) ylabel(-.05(0.025).05, nogrid angle(0) glcolor(gs16) labsize(medlarge)) ///
         graphregion(color(white)) plotregion(color(white)) ///
		 legend(off) yline(0, lcolor(red) lw(medium))  ///
		 xline(0, lpattern(dot) lcolor(red) lwidth(medthick)) aspectratio(.5)
graph save "Figure3_b", replace
graph export "Figure3_b.pdf" , as(pdf) replace

** Panel C. Property Tax Revenues 
set more off
use "CarreriPayson_replication_main.dta", clear
gen period_1 = (year_normalized==-4)
gen period_2 = (year_normalized==-3)
gen period_3 = (year_normalized==-2)
gen period_4 = (year_normalized==-1)
gen period_5 = (year_normalized==0)
gen period_6 = (year_normalized==1)
gen period_7 = (year_normalized==2)
gen period_8 = (year_normalized==3)
gen period_9 = (year_normalized==4)
forvalues i=1(1)9 {
 gen d`i'=mgmt_re*period_`i'
 }
* With Controls - log
reghdfe lnc_rev_property d1-d4 d6-d9  , ///
  absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ) ///
	vce(cluster city_id)  keepsingletons 
	su mgmt if e(sample)
	local mgmt_sd = r(sd)
    * save coefficients
    foreach i in 1 2 3 4 6 7 8 9 {
        local b`i' = _b[d`i']*`mgmt_sd'
        local se`i' = _se[d`i']
        local ub_b`i' = _b[d`i']*`mgmt_sd' + 1.96*_se[d`i']*`mgmt_sd'
        local lb_b`i' = _b[d`i']*`mgmt_sd' - 1.96*_se[d`i']*`mgmt_sd'
         }
  clear
  set obs 9
  egen t = seq()
  gen b = 0
  gen se = 0
  gen ub_b = 0
  gen lb_b = 0
  label var b "Property Tax Revenues"
    foreach i in 1 2 3 4 6 7 8 9 {
       replace b = `b`i'' in `i'
       replace se = `se`i'' in `i'
       replace ub_b = `ub_b`i'' in `i'
       replace lb_b = `lb_b`i'' in `i'
       }
	replace t=t-5
 twoway (connected b t, mcolor(black) lcolor(black) lpattern(solid)  msymbol(D) lwidth(medthick)) ///
		(connected lb_b t, lcolor(black) msymbol(none) lpattern(dot) lwidth(medthick)) ///
		(connected ub_b t, lcolor(black) msymbol(none) lpattern(dot) lwidth(medthick)), ///
         xtitle("Years since election/appointment", size(large)) xlabel(-4(1)4, labsize(medlarge)) ///
		 ytitle("δ estimate x standard deviation", size(large)) ylabel(-.1(0.05).1, nogrid angle(0) glcolor(gs16) labsize(medlarge)) ///
         graphregion(color(white)) plotregion(color(white)) ///
		 legend(off) yline(0, lcolor(red) lw(medium))  ///
		 xline(0, lpattern(dot) lcolor(red) lwidth(medthick)) aspectratio(.5)
graph save "Figure3_c", replace		 
graph export "Figure3_c.pdf" , as(pdf) replace
erase "Figure3_a.gph"
erase "Figure3_b.gph" 
erase "Figure3_c.gph"





*** Table 3 - Controlling for Voter Ideology
set more off
use "CarreriPayson_replication_main.dta", clear
cap erase "Table3.txt"
cap erase "Table3.tex"
foreach x in pop_acs medhome c_rev_property {
reghdfe ln`x' post_mgmt_re contributors_rep_share, ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "Table3.tex", keep(post_mgmt_re contributors_rep_share) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addt(Leader Controls, Y, City Controls, Y) bdec(3) nocon label	
}
erase "Table3.txt"




******** Table 4 - Correlation Between Predecessors and Successors
set more off
use "CarreriPayson_replication_predecessors.dta", clear
cap erase "Table4.txt"
cap erase "Table4.tex"
foreach x in mgmt_re q0g_female minority age_inoffice q18_schoolyrs q15b_govtexperience ///
			 q20_occupation_business q14_left q14_center q14_right {
reg `x'0 `x'1
su `x'0 if e(sample)==1
local zero_mean = r(mean)
outreg2 using "Table4.tex", bdec(3) label addstat(Mean Successor, `zero_mean') 
}
erase "Table4.txt"



******** Table 5 - Managerial Score and Growth Index
set more off
use "CarreriPayson_replication_main.dta", clear
cap erase "Table5.txt"
cap erase "Table5.tex"
* Baseline 
reghdfe index_growth post_mgmt_re, ///
	absorb(city_id year_calendar year_normalized i.interviewer_id#i.post manager#i.post i.pop_quint#i.post) ///
	vce(cluster city_id)  keepsingletons 
 su index_growth if e(sample)==1 & post==0
 local mindex_growth=r(mean)
 local sindex_growth=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "Table5.tex", keep(post_mgmt_re) /// 
	addstat(Cities, `num_city', Mean DV Pre, `mindex_growth', SD DV Pre, `sindex_growth') ///
	addtext(Leader Controls, N, City Controls, N) bdec(3) nocon label	
* With Mayor Control
reghdfe index_growth post_mgmt_re , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post) /// 
	vce(cluster city_id)  keepsingletons 
 su index_growth if e(sample)==1 & post==0
 local mindex_growth=r(mean)
 local sindex_growth=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "Table5.tex", keep(post_mgmt_re) /// 
	addstat(Cities, `num_city', Mean DV Pre, `mindex_growth', SD DV Pre, `sindex_growth') ///
	addtext(Leader Controls, Y, City Controls, N) bdec(3) nocon label	
* With Mayor & City Control
reghdfe index_growth post_mgmt_re , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) /// 
	vce(cluster city_id)  keepsingletons 
 su index_growth if e(sample)==1 & post==0
 local mindex_growth=r(mean)
 local sindex_growth=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "Table5.tex", keep(post_mgmt_re) /// 
	addstat(Cities, `num_city', Mean DV Pre, `mindex_growth', SD DV Pre, `sindex_growth') ///
	addtext(Leader Controls, Y, City Controls, Y) bdec(3) nocon label
* With Mayor & City & Voter Ideology Controllingforeach x in index_growth {
reghdfe index_growth post_mgmt_re contributors_rep_share, ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) /// 
	vce(cluster city_id)  keepsingletons 
 su index_growth if e(sample)==1 & post==0
 local mindex_growth=r(mean)
 local sindex_growth=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "Table5.tex", keep(post_mgmt_re contributors_rep_share) /// 
	addstat(Cities, `num_city', Mean DV Pre, `mindex_growth', SD DV Pre, `sindex_growth') ///
	addtext(Leader Controls, Y, City Controls, Y) bdec(3) nocon label	
erase "Table5.txt"





*** Table 6 - Managerial Score and Growth: Mayors vs. Managers
use "CarreriPayson_replication_main.dta", clear
cap erase "Table6.txt"
cap erase "Table6.tex"
* Baseline 
reghdfe index_growth post_mgmt_re_manager post_mgmt_re post_manager, ///
	absorb(city_id year_calendar year_normalized i.interviewer_id#i.post  i.pop_quint#i.post) ///
	vce(cluster city_id)  keepsingletons 
 su index_growth if e(sample)==1 & post==0
 local mindex_growth=r(mean)
 local sindex_growth=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "Table6.tex", keep(post_mgmt_re_manager post_mgmt_re post_manager) /// 
	addstat(Cities, `num_city', Mean DV Pre, `mindex_growth', SD DV Pre, `sindex_growth') ///
	addtext(Leader Controls, N, City Controls, N) bdec(3) nocon label	
* With Mayor Control
reghdfe index_growth post_mgmt_re_manager post_mgmt_re post_manager , ///
	absorb(city_id year_calendar year_normalized   ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post) /// 
	vce(cluster city_id)  keepsingletons 
 su index_growth if e(sample)==1 & post==0
 local mindex_growth=r(mean)
 local sindex_growth=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "Table6.tex", keep(post_mgmt_re_manager post_mgmt_re post_manager) /// 
	addstat(Cities, `num_city', Mean DV Pre, `mindex_growth', SD DV Pre, `sindex_growth') ///
	addtext(Leader Controls, Y, City Controls, N) bdec(3) nocon label	
* With Mayor & City Control
reghdfe index_growth post_mgmt_re_manager post_mgmt_re post_manager , ///
	absorb(city_id year_calendar year_normalized   ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) /// 
	vce(cluster city_id)  keepsingletons 
 su index_growth if e(sample)==1 & post==0
 local mindex_growth=r(mean)
 local sindex_growth=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "Table6.tex", keep(post_mgmt_re_manager post_mgmt_re post_manager) /// 
	addstat(Cities, `num_city', Mean DV Pre, `mindex_growth', SD DV Pre, `sindex_growth') ///
	addtext(Leader Controls, Y, City Controls, Y) bdec(3) nocon label	
erase "Table6.txt"




*** Table 7 - When Leaders Mention Growth As A Goal
cap erase "Table7.tex"
cap erase "Table7.txt"
* Just Managerial Score
reghdfe index_growth post_mgmt_re , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) /// 
	vce(cluster city_id)  keepsingletons 
 su index_growth if e(sample)==1 & post==0
 local mindex_growth=r(mean)
 local sindex_growth=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "Table7.tex", keep(post_mgmt_re post_economic_dev_any post_mgmt_re_economic_dev_any) /// 
	addstat(Cities, `num_city', Mean DV Pre, `mindex_growth', SD DV Pre, `sindex_growth') ///
	addtext(Leader Controls, Y, City Controls, Y) bdec(3) nocon label	
	
* Just Growth Goal 
reghdfe index_growth post_economic_dev_any , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) /// 
	vce(cluster city_id)  keepsingletons 
 su index_growth if e(sample)==1 & post==0
 local mindex_growth=r(mean)
 local sindex_growth=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "Table7.tex", keep(post_mgmt_re post_economic_dev_any post_mgmt_re_economic_dev_any) /// 
	addstat(Cities, `num_city', Mean DV Pre, `mindex_growth', SD DV Pre, `sindex_growth') ///
	addtext(Leader Controls, Y, City Controls, Y) bdec(3) nocon label
	
* Horserace
reghdfe index_growth post_mgmt_re post_economic_dev_any , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) /// 
	vce(cluster city_id)  keepsingletons 
 su index_growth if e(sample)==1 & post==0
 local mindex_growth=r(mean)
 local sindex_growth=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "Table7.tex", keep(post_mgmt_re post_economic_dev_any post_mgmt_re_economic_dev_any) /// 
	addstat(Cities, `num_city', Mean DV Pre, `mindex_growth', SD DV Pre, `sindex_growth') ///
	addtext(Leader Controls, Y, City Controls, Y) bdec(3) nocon label
	
* Heterogeneous Effect
reghdfe index_growth post_mgmt_re post_economic_dev_any post_mgmt_re_economic_dev_any , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) /// 
	vce(cluster city_id)  keepsingletons 
 su index_growth if e(sample)==1 & post==0
 local mindex_growth=r(mean)
 local sindex_growth=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "Table7.tex", keep(post_mgmt_re post_economic_dev_any post_mgmt_re_economic_dev_any) /// 
	addstat(Cities, `num_city', Mean DV Pre, `mindex_growth', SD DV Pre, `sindex_growth') ///
	addtext(Leader Controls, Y, City Controls, Y) bdec(3) nocon label
erase "Table7.txt"






*******************************************************
*                                                     *
*               APPENDIX TABLES/FIGURES               *
*                                                     *
*******************************************************


*** Figure A1 - Recruitment Letter and Project Description


*** Figure A2 - National League of Cities Letter of Support



*** Table A1 - Interviewed vs. Non-Interviewed Cities - Balance
*** Note: first block of code generates Columns 1, 2, and 4. Second block of code generates Columns 1, 3, and 5.
set more off
use "CarreriPayson_replication_balancetable1.dta", clear
cap erase "TableA1_columns124.tex"
cap erase "TableA1_columns124.txt"
balancetable not_interviewed  ///
	pcc_rev_property cogpop medianhousevalue ///
	pctwhite pctunemployed bachelorsdegree ///
	using "TableA1_columns124.tex", replace
	
	
use "CarreriPayson_replication_balancetable2.dta", clear
cap erase "TableA1_columns135.tex"
cap erase "TableA1_columns135.txt"
balancetable not_interviewed pcc_rev_property cogpop medianhousevalue ///
	pctwhite pctunemployed bachelorsdegree ///
	using "TableA1_columns135.tex",  replace

	
	
*** Figure A3 - Survey Instrument and Rubric



*** Figure A4 - Example of Survey Question, Scoring Grid, and Anonymized Answers

	


*** Table A2 - Summary statistics
set more off
use "CarreriPayson_replication_main.dta", clear
cap erase "TableA2.txt"
cap erase "TableA2.tex"
reghdfe /*lnexp_alloc*/ lnpop_acs post_mgmt_re , ///
	absorb(city_id year_calendar year_normalized manager#i.post ///
		   i.pop_quint#i.post i.interviewer_id#i.post) ///
	vce(cluster city_id)  keepsingletons 
keep if e(sample)
*** Table
* Leaders Characteristics
preserve
duplicates drop city state, force
	replace pop_first_year_acs=pop_first_year_acs/1000
	xtile age_quint = age_inoffice, nq(5)
	xtile govexp_quint=q15b_govtexperience, nq(5)
sutex mgmt_re mgmt_rew ///
	  manager female age_inoffice q18_schoolyrs ///
	  q15b_govtexperience q20_occupation_business ///
	  q14_left q14_center q14_right ///
	  economic_dev_any exp ///
	  , nobs minmax lab file("TableA2")  
restore
* Outcomes
sutex index_growth lnpop_acs lnmedhome lnc_rev_property ///
	  lnmedincome poverty unemp white college ///
	  contributors_rep_share ///
	  , nobs minmax lab file("TableA2") append

 
 
 
 
*** Figure A5 - Distribution of the Managerial Scores: Mayors vs. City Managers
set more off
graph set window fontface "Times New Roman"
use "CarreriPayson_replication_main.dta", clear
duplicates drop city state, force
su mgmt_re if manager==0
hist mgmt_re if manager==0, ///
    width(.2) ///
	title("Panel A: Mayors", color(black) size(vlarge)) ///
	xtitle("Managerial Score", size(large)) xlabel(1(1)5, labsize(medium)) ///
    ytitle("Density", size(large)) ylabel(0(.2)1, labsize(small) angle(0) nogrid ) ///
    legend(off) color(gray) lcolor(white) ///
    graphregion(color(white)) plotregion(color(white)) ///
	addplot(pci 0   3.36  .9   3.36, lcolor(blue) lwidth(thick))
graph save "FigureA5_mayors", replace
graph export "FigureA5_mayors.pdf", as(pdf) replace
erase "FigureA5_mayors.gph"
su mgmt_re if manager==1
hist mgmt_re if manager==1, ///
    width(.2) ///
	title("Panel B: City Managers", color(black) size(vlarge)) ///
	xtitle("Managerial Score", size(large)) xlabel(1(1)5, labsize(medium)) ///
    ytitle("Density", size(large)) ylabel(0(.2)1, labsize(small) angle(0) nogrid ) ///
    legend(off) color(gray) lcolor(white) ///
    graphregion(color(white)) plotregion(color(white)) ///
	addplot(pci 0   3.91  .9   3.91, lcolor(blue) lwidth(thick))
graph save "FigureA5_managers", replace
graph export "FigureA5_managers.pdf", as(pdf) replace
erase "FigureA5_managers.gph"
	
	
	
	
*** Table A3 - Reliability of Managerial Score: Pairwise Correlations of Components
set more off
use "CarreriPayson_replication_main.dta", clear
capture drop "TableA3.tex"
capture drop "TableA3.txt"
duplicates drop city state, force
reg mgmt_re_target mgmt_re_operations 
outreg2 using "TableA3.tex", bdec(3) nocon label
reg mgmt_re_target mgmt_re_monitoring 
outreg2 using "TableA3.tex", bdec(3) nocon label
reg mgmt_re_target mgmt_re_people
outreg2 using "TableA3.tex", bdec(3) nocon label
reg mgmt_re_operations mgmt_re_monitoring
outreg2 using "TableA3.tex", bdec(3) nocon label
reg mgmt_re_operations mgmt_re_people
outreg2 using "TableA3.tex", bdec(3) nocon label
reg mgmt_re_monitoring mgmt_re_people
outreg2 using "TableA3.tex", bdec(3) nocon label
erase "TableA3.txt"
alpha mgmt_target mgmt_operations mgmt_monitoring mgmt_people




*** Table A4 - No Difference in City Demographics for High- vs. Low-Scoring Leaders
set more off
use "CarreriPayson_replication_main.dta", clear
keep if year_normalized<0
cap erase "TableA4.txt"
cap erase "TableA4.tex"
* Full Sample
reg mgmt_re lnpop_acs poverty unemp white college lnmedincome lnmedhome i.state_id, cl(city_unique)
	egen num_mun=nvals(city state) if e(sample)==1
	su num_mun
	local num_mun=r(mean)
	drop num_mun
outreg2 using "TableA4.tex", bdec(3) adec(0) nocon label ///
	addstat(Cities, `num_mun') keep(lnpop_acs poverty unemp white college lnmedincome lnmedhome) 
* Mayors
reg mgmt_re lnpop_acs poverty unemp white college lnmedincome lnmedhome i.state_id if manager==0, cl(city_unique)
	egen num_mun=nvals(city state) if e(sample)==1
	su num_mun
	local num_mun=r(mean)
	drop num_mun
outreg2 using "TableA4.tex", bdec(3) adec(0) nocon label ///
	addstat(Cities, `num_mun') keep(lnpop_acs poverty unemp white college lnmedincome lnmedhome)
* Managers
reg mgmt_re lnpop_acs poverty unemp white college lnmedincome lnmedhome i.state_id if manager==1, cl(city_unique)
	egen num_mun=nvals(city state) if e(sample)==1
	su num_mun
	local num_mun=r(mean)
	drop num_mun
outreg2 using "TableA4.tex", bdec(3) adec(0) nocon label ///
	addstat(Cities, `num_mun') keep(lnpop_acs poverty unemp white college lnmedincome lnmedhome)
erase "TableA4.txt"





*** TableA5 - No Difference in City Growth for High- vs. Low-Scoring Leaders
set more off
use "CarreriPayson_replication_main.dta", clear
keep if year_normalized<0
sort city_unique year_normalized
foreach x in pop_acs medincome medhome {
by city_unique: gen `x'_growth=(`x'-`x'[_n-1])/`x'[_n-1]
}
cap erase "TableA5.txt"
cap erase "TableA5.tex"
* population growth
reg pop_acs_growth mgmt_re i.state_id, cl(city_unique)
	egen num_mun=nvals(city state) if e(sample)==1
	su num_mun
	local num_mun=r(mean)
	drop num_mun
outreg2 using "TableA5.tex", bdec(3) adec(0) nocon label ///
	addstat(Cities, `num_mun') keep(mgmt_re) 
* Median Income Growth
reg medincome_growth mgmt_re i.state_id, cl(city_unique)
	egen num_mun=nvals(city state) if e(sample)==1
	su num_mun
	local num_mun=r(mean)
	drop num_mun
outreg2 using "TableA5.tex", bdec(3) adec(0) nocon label ///
	addstat(Cities, `num_mun') keep(mgmt_re) 
* Median Home Values Growth_Goal
reg medhome_growth mgmt_re i.state_id, cl(city_unique)
	egen num_mun=nvals(city state) if e(sample)==1
	su num_mun
	local num_mun=r(mean)
	drop num_mun
outreg2 using "TableA5.tex", bdec(3) adec(0) nocon label ///
	addstat(Cities, `num_mun') keep(mgmt_re) 
erase "TableA5.txt"
	
	
	
	
*** Table A6 - Robustness to time-varying controls
set more off
use "CarreriPayson_replication_main.dta", clear
cap erase "TableA6.txt"
cap erase "TableA6.xlsx"
foreach x in pop_acs medhome c_rev_property {
reghdfe ln`x' post_mgmt_re ///
	white college poverty unemp medincome , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post ///
	i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA6.tex", keep(post_mgmt_re) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, Y, City Controls, Y) bdec(3) nocon label	
}
erase "TableA6.txt"



*** Table A7 - Robustness to Inverse Covariance Weighted Managerial Score
*** Note: generates each panel of Table A7 as a separate table named by dependent variable
set more off
use "CarreriPayson_replication_main.dta", clear
foreach x in pop_acs medhome c_rev_property {
cap erase "TableA7_`x'.txt"
cap erase "TableA7_`x'.tex"
* Baseline 
reghdfe ln`x' post_mgmt_rew, ///
	absorb(city_id year_calendar year_normalized i.interviewer_id#i.post manager#i.post i.pop_quint#i.post) ///
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA7_`x'.tex", keep(post_mgmt_rew) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, N, City Controls, N) bdec(3) nocon label	
* With Mayor Control
reghdfe ln`x' post_mgmt_rew , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA7_`x'.tex", keep(post_mgmt_rew) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, Y, City Controls, N) bdec(3) nocon label	
* With Mayor & City Control
reghdfe ln`x' post_mgmt_rew , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA7_`x'.tex", keep(post_mgmt_rew) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, Y, City Controls, Y) bdec(3) nocon label	
erase "TableA7_`x'.txt"
}
* Baseline 
foreach x in index_growth {
cap erase "TableA7_`x'.txt"
cap erase "TableA7_`x'.tex"
reghdfe `x' post_mgmt_rew, ///
	absorb(city_id year_calendar year_normalized i.interviewer_id#i.post manager#i.post i.pop_quint#i.post) ///
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA7_`x'.tex", keep(post_mgmt_rew) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, N, City Controls, N) bdec(3) nocon label	
* With Mayor Control
reghdfe `x' post_mgmt_rew , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA7_`x'.tex", keep(post_mgmt_rew) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, Y, City Controls, N) bdec(3) nocon label	
* With Mayor & City Control
reghdfe `x' post_mgmt_rew , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA7_`x'.tex", keep(post_mgmt_rew) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, Y, City Controls, Y) bdec(3) nocon label
erase "TableA7_`x'.txt"
}



*** Table A8 - Dropping one practice at a time from the Managerial Score
*** Note: generates each panel separately. 
*** Minust - no Target Setting. Minuso - no Operations. Minusm - no Monitoring.
*** Minusp - no Incentives.
set more off
use "CarreriPayson_replication_main.dta", clear
cap erase "TableA8_Minust.txt"
cap erase "TableA8_Minust.tex"
cap erase "TableA8_Minuso.txt"
cap erase "TableA8_Minuso.tex"
cap erase "TableA8_Minusm.txt"
cap erase "TableA8_Minusm.tex"
cap erase "TableA8_Minusp.txt"
cap erase "TableA8_Minusp.tex"
egen mgmt_re_not = rowmean(mgmt_re_operations mgmt_re_monitoring mgmt_re_people)
egen mgmt_re_noo = rowmean(mgmt_re_target mgmt_re_monitoring mgmt_re_people)
egen mgmt_re_nom = rowmean(mgmt_re_target mgmt_re_operations mgmt_re_people)
egen mgmt_re_nop = rowmean(mgmt_re_target mgmt_re_operations mgmt_re_monitoring)
foreach z in t o m p {
gen post_mgmt_re_no`z' = post*mgmt_re_no`z'
* Baseline - log
foreach x in index_growth {
reghdfe `x' post_mgmt_re_no`z' , ///
	absorb(city_id year_calendar year_normalized manager#i.post ///
		   i.pop_quint#i.post i.interviewer_id#i.post) ///
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA8_Minus`z'.tex", keep(post_mgmt_re_no`z') /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Population Quintiles FE, Y, Form of Gov't FE, Y, Controls, N) bdec(3) nocon label	
* With Mayor Controls 
reghdfe `x' post_mgmt_re_no`z' , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post) /// 
	vce(cluster city_id)  keepsingletons 
	su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
  local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA8_Minus`z'.tex", keep(post_mgmt_re_no`z') /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, N, City Controls, Y) bdec(3) nocon label
* With Mayor and City Controls 
reghdfe `x' post_mgmt_re_no`z' , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA8_Minus`z'.tex", keep(post_mgmt_re_no`z') /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, Y, City Controls, Y) bdec(3) nocon label	
}
erase "TableA8_Minus`z'.txt"
}




*** Table A9 - The Effect of Managerial Skill Does Not Vary By Tenure
use "CarreriPayson_replication_main.dta", clear
cap erase "TableA9.txt"
cap erase "TableA9.tex"
* Baseline 
reghdfe index_growth  post_mgmt_re_exp post_mgmt_re post_exp  , ///
	absorb(city_id year_calendar year_normalized i.interviewer_id#i.post manager#i.post i.pop_quint#i.post) ///
	vce(cluster city_id)  keepsingletons 
 su index_growth if e(sample)==1 & post==0
 local mindex_growth=r(mean)
 local sindex_growth=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA9.tex", keep(post_mgmt_re_exp post_mgmt_re post_exp) /// 
	addstat(Cities, `num_city', Mean DV Pre, `mindex_growth', SD DV Pre, `sindex_growth') ///
	addtext(Leader Controls, Y, City Controls, N) bdec(3) nocon label	
* With Mayor Control	
reghdfe index_growth  post_mgmt_re_exp post_mgmt_re post_exp  , ///
		absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post) ///
	vce(cluster city_id)  keepsingletons 
 su index_growth if e(sample)==1 & post==0
 local mindex_growth=r(mean)
 local sindex_growth=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA9.tex", keep(post_mgmt_re_exp post_mgmt_re post_exp) /// 
	addstat(Cities, `num_city', Mean DV Pre, `mindex_growth', SD DV Pre, `sindex_growth') ///
	addtext(Leader Controls, Y, City Controls, N) bdec(3) nocon label
* With Mayor & City Control	
reghdfe index_growth  post_mgmt_re_exp post_mgmt_re post_exp  , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) ///
	vce(cluster city_id)  keepsingletons 
 su index_growth if e(sample)==1 & post==0
 local mindex_growth=r(mean)
 local sindex_growth=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA9.tex", keep(post_mgmt_re_exp post_mgmt_re post_exp) /// 
	addstat(Cities, `num_city', Mean DV Pre, `mindex_growth', SD DV Pre, `sindex_growth') ///
	addtext(Leader Controls, Y, City Controls, N) bdec(3) nocon label
erase "TableA9.txt"



*** Table A10 - Controlling for Self-Declared Ideology (Panel A pop, Panel B home, PanelC pro, Panel D growth index)
set more off
use "CarreriPayson_replication_main.dta", clear
gen q14_center_post=q14_center*post
gen q14_right_post=q14_right*post
gen q14_left_post=q14_left*post
*** Panels A, B, C
foreach x in pop_acs medhome c_rev_property {
cap erase "TableA10_`x'.txt"
cap erase "TableA10_`x'.xlsx"
* Baseline - Log
reghdfe ln`x' post_mgmt_re, ///
	absorb(city_id year_calendar year_normalized i.interviewer_id#i.post manager#i.post i.pop_quint#i.post) ///
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA10_`x'.tex", keep(post_mgmt_re q14_center_post q14_right_post) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, N, City Controls, N) bdec(3) nocon label	
* With Mayor Control
reghdfe ln`x' post_mgmt_re q14_center_post q14_right_post , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA10_`x'.tex", keep(post_mgmt_re q14_center_post q14_right_post) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, Y, City Controls, N) bdec(3) nocon label	
* With Mayor & City Control
reghdfe ln`x' post_mgmt_re q14_center_post q14_right_post , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA10_`x'.tex", keep(post_mgmt_re q14_center_post q14_right_post) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, Y, City Controls, Y) bdec(3) nocon label	
erase "TableA10_`x'.txt"
} 
*** Panel D
foreach x in index_growth {
cap erase "TableA10_`x'.txt"
cap erase "TableA10_`x'.xlsx"
* Baseline - Log
reghdfe `x' post_mgmt_re, ///
	absorb(city_id year_calendar year_normalized i.interviewer_id#i.post manager#i.post i.pop_quint#i.post) ///
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA10_`x'.tex", keep(post_mgmt_re q14_center_post q14_right_post) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, N, City Controls, N) bdec(3) nocon label	
* With Mayor Control
reghdfe `x' post_mgmt_re q14_center_post q14_right_post , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA10_`x'.tex", keep(post_mgmt_re q14_center_post q14_right_post) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, Y, City Controls, N) bdec(3) nocon label	
* With Mayor & City Control
reghdfe `x' post_mgmt_re q14_center_post q14_right_post , ///
	absorb(city_id year_calendar year_normalized  manager#i.post ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA10_`x'.tex", keep(post_mgmt_re q14_center_post q14_right_post) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, Y, City Controls, Y) bdec(3) nocon label
erase "TableA10_`x'.txt"
}




*** Table A11 - Managerial Score and growth: Mayors vs. Managers
set more off
use "CarreriPayson_replication_main.dta", clear
foreach x in pop_acs medhome c_rev_property {
cap erase "TableA11_`x'.txt"
cap erase "TableA11_`x'.tex"
foreach m in 0 1 {
* Baseline 
reghdfe ln`x' post_mgmt_re if manager==`m', ///
	absorb(city_id year_calendar year_normalized i.interviewer_id#i.post  i.pop_quint#i.post) ///
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA11_`x'.tex", keep(post_mgmt_re) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, N, City Controls, N) bdec(3) nocon label	
* With Mayor Control
reghdfe ln`x' post_mgmt_re  if manager==`m' , ///
	absorb(city_id year_calendar year_normalized   ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA11_`x'.tex", keep(post_mgmt_re) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, Y, City Controls, N) bdec(3) nocon label	
* With Mayor & City Control
reghdfe ln`x' post_mgmt_re  if manager==`m' , ///
	absorb(city_id year_calendar year_normalized   ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA11_`x'.tex", keep(post_mgmt_re) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, Y, City Controls, Y) bdec(3) nocon label
}
erase "TableA11_`x'.txt"
}
* Baseline 
foreach x in index_growth {
cap erase "TableA11_`x'.txt"
cap erase "TableA11_`x'.tex"
foreach m in 0 1 {
reghdfe `x' post_mgmt_re if manager==`m', ///
	absorb(city_id year_calendar year_normalized i.interviewer_id#i.post  i.pop_quint#i.post) ///
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA11_`x'.tex", keep(post_mgmt_re) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, N, City Controls, N) bdec(3) nocon label	
* With Mayor Control
reghdfe `x' post_mgmt_re  if manager==`m', ///
	absorb(city_id year_calendar year_normalized   ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA11_`x'.tex", keep(post_mgmt_re) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, Y, City Controls, N) bdec(3) nocon label	
* With Mayor & City Control
reghdfe `x' post_mgmt_re  if manager==`m', ///
	absorb(city_id year_calendar year_normalized   ///
	i.pop_quint#i.post i.interviewer_id#i.post ///
	i.female#i.post i.minority#i.post i.age_inofficeq#i.post i.q18_schoolyrs#i.post ///
	i.q15b_govtexperienceq#i.post i.q20_occupation_business#i.post ///
	c.white_first_year#i.post c.college_first_year#i.post ///
	c.poverty_first_year#i.post c.unemp_first_year#i.post ///
	c.medincome_first_year#i.post ) /// 
	vce(cluster city_id)  keepsingletons 
 su `x' if e(sample)==1 & post==0
 local m`x'=r(mean)
 local s`x'=r(sd)
 egen num_city=nvals(city state) if e(sample)==1
 su num_city
 local num_city=r(mean)
 drop num_city
outreg2 using "TableA11_`x'.tex", keep(post_mgmt_re) /// 
	addstat(Cities, `num_city', Mean DV Pre, `m`x'', SD DV Pre, `s`x'') ///
	addtext(Leader Controls, Y, City Controls, Y) bdec(3) nocon label
}
erase "TableA11_`x'.txt"
}




log close

	






